<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>评论管理</title>
    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">
    <script language="javascript" type="text/javascript" src="__PUBLIC__/My97DatePicker/WdatePicker.js"></script>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>评论审核<small></small></h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form method="post" action="__CONTROLLER__/examine/id/{$id}" id="examint">
                        <div class="tab-content">
                            <div class="tab-pane active">
                                <table cellpadding="2" cellspacing="2" width="100%">
                                    <tbody>
                                    <tr>
                                        <td>审核不通过原因:</td>
                                        <td>
                                            <textarea class="input col-sm-2" id="remark" name="remark">{$examine_result.remark}</textarea>
                                        </td>
                                    </tr>
                                    <input type="hidden" id="id" value="{$id}" name="id">
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <input type="hidden" id="adopt" name="adopt">
                        <input type="button" class="green" onclick="examine(1)" value="审核通过" id="ok">
                        <input type="button" class="red" onclick="examine(2)" value="审核不通过" id="err">
                        <input type="hidden" id="examineval" value="{$examine_result['examine']}">
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/Theme1/js/plugins/iCheck/icheck.min.js"></script>
<script>
    $(document).ready(function(){
        var examineval=$("#examineval").val();

        if(examineval==1){
            $("#ok").attr("disabled","disabled")
        }else if(examineval==2){
            $("#err").attr("disabled","disabled")
        }
    })

    function examine(value) {
        //点的是通过
        if(value == 1) {
            $("#adopt").val(1);
        } else if (value == 2) {
            //点的是不通过
            $("#adopt").val(2);
            var remark = $("#remark").val();
            if (remark == '') {
                alert("请填写不通过原因");
                return false;
            }
        }
        $("#examint").submit();
    }

</script>
</body>
</html>
